#include "criticalsection.h"

namespace syncLib
{
    CriticalSection::CriticalSection()
    {
        InitializeCriticalSection(&mCritSection_);
    }

    CriticalSection::~CriticalSection()
    {
        DeleteCriticalSection(&mCritSection_);
    }

    void CriticalSection::Lock()
    {
        EnterCriticalSection(&mCritSection_);
    }

    void CriticalSection::UnLock()
    {
        LeaveCriticalSection(&mCritSection_);
    }

};